<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>支付处理中</title>
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
</head>
<body>
<div class="container mt-5">
    <div class="card text-center">
        <div class="card-header bg-warning">
            <h3>支付处理中</h3>
        </div>
        <div class="card-body">
            <div class="mb-4">
                <div class="spinner-border text-warning" style="width: 5rem; height: 5rem;" role="status">
                    <span class="visually-hidden">Loading...</span>
                </div>
            </div>
            <h4 class="card-title" th:text="${message}">支付成功！订单处理中，请稍后...</h4>
            <p class="card-text">
                订单号: <span th:text="${alipayParams['out_trade_no']}"></span><br>
                支付宝交易号: <span th:text="${alipayParams['trade_no']}"></span>
            </p>

            <div class="mt-4">
                <button class="btn btn-warning" onclick="location.reload()">
                    刷新状态
                </button>
                <a th:href="@{/}" class="btn btn-outline-secondary ms-2">
                    返回首页
                </a>
            </div>
        </div>
    </div>
</div>

<script>
    // 5秒后自动刷新
    setTimeout(() => {
        location.reload();
    }, 5000);
</script>
</body>
</html>